﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YXShop.IDAL.SystemInfo;
using YXShop.DALFactory;

namespace YXShop.BLL.SystemInfo
{
   public class SMS
    {
       private readonly ISMS dal = DataAccess.CreateSMS();
       public SMS()
       {
       }
        #region "Database Operation"
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
       public int Add(YXShop.Model.SystemInfo.SMS model)
       {
           return dal.Add(model);
       }
         /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
       public void Update(YXShop.Model.SystemInfo.SMS model)
       {
           dal.Update(model);
       }
       /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
       public void Delete(int id)
       {
           dal.Delete(id);
       }
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
       public void DeleteAll(string ids)
       {
           dal.DeleteAll(ids);
       }
        #endregion

        #region  "Data Load"
        /// <summary> 
        /// 根据ID返回对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
       public YXShop.Model.SystemInfo.SMS GetModelById(int id) 
       {
           return dal.GetModelById(id);
       }

       /// <summary>
       /// 得到银行所有集合
       /// </summary>
       /// <returns></returns>
       public List<YXShop.Model.SystemInfo.SMS> GetByWhere(string where)
       {
           return dal.GetByWhere(where);
       }
        /// <summary>
        /// 分页
        /// </summary>
        /// <returns></returns>
       public ChangeHope.DataBase.DataByPage GetListByWhere(string where)
       {
           return dal.GetListByWhere(where);
       }

       public ChangeHope.DataBase.DataByPage GetList(string orderfield, int pagesize, string Conditions)
       {
           return dal.GetList(orderfield, pagesize, Conditions);
       }
       #endregion
    }
}
